<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStoreTable extends Migration
{
    /**
     * Run the migrations.
     * 店铺表
     * @return void
     */
    public function up()
    {
        Schema::create('store', function (Blueprint $table) {
            $table->increments('id');
	        $table->tinyInteger('department_id')->comment('部门id');
	        $table->string('name',20)->comment('店铺名称');
	        $table->string('owner_name',20)->comment('店长姓名');
	        $table->integer('leader_id')->comment('店长id');
	        $table->tinyInteger('people_num')->comment('店铺人数');
	        $table->integer('month_hour')->comment('店铺每月工时');
	        $table->float('continue_hour')->comment('开始签到可延时长');
	        $table->float('radius')->comment('签到有效范围半径');
	        $table->string('address',100)->comment('店铺地址');
	        $table->string('longitude',50)->comment('经度');
	        $table->string('latitude',50)->comment('纬度');
	        $table->tinyInteger('status')->comment('配置状态：0无效，1有效')->default(1);
	        $table->integer('company_id')->comment('所属公司id')->nullable();
	        $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('store');
    }
}
